package com.wellinast.spring_ai.web.controller;

import jakarta.annotation.Resource;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenfeng
 * @version 1.0
 * @description: TODO
 * @date 2025/8/5 13:10
 */
@RestController
@RequestMapping("/deepseek")
public class DeepSeekController {


    @Resource
    private ChatClient client;


    @GetMapping("/chat")
    public String chat(String message) {
        return client.prompt(message).call().content();
    }

}
